﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;

namespace ZDSoft.UPMS.Model.BusinessPart
{
    /// <summary>
    /// 情况类
    /// </summary>
    /// Author：刘祖民
    /// CreateTime:2013-5-22

    [ActiveRecord]
    public class SituationType : ModelBase<SituationType>
    {
        [Property]
        public string Name { get; set; }

        [HasMany(typeof(SituationType), ColumnKey = "ParentID")]
        public IList<SituationType> Children { get; set; }

        [BelongsTo("ParentID")]
        public SituationType Parent { get; set; }


        [HasMany(typeof(Situation), ColumnKey = "SituationTypeID")]
        public IList<Situation> Situation { get; set; }



        [HasMany(typeof(Situation), ColumnKey = "SituationTypeID", Inverse = true, Lazy = true)]
        public IList<Situation> Situations { get; set; }
    }
}
